package com.united.ucts.modules.system.component;

import com.united.ucts.modules.system.service.ResourceService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * 资源与角色访问对应关系操作组件
 *
 * @author Hudan
 * @version 1.0
 * @filename ResourceRoleRulesHolder.java
 * @copyright <a href="www.united.cn">www.united.cn</a>
 * @date 2019-11-23
 */
@RequiredArgsConstructor
@Component
public class ResourceRoleRulesHolder {

    private final ResourceService resourceService;

    /**
     * 初始化方法,在服务启动的时候调用
     * 用于加载应用的权限资源
     */
    @PostConstruct
    public void initResourceRolesMap() {
        resourceService.initResourceRolesMap();
    }
}